package cn.hoichun.news.Util;

import cn.hoichun.news.Domain.MyMap;

import java.util.HashMap;
import java.util.List;

public class ToMap {
    public static HashMap<String, Double> toMap(List<MyMap> Map) {
        HashMap<String, Double> hashMap = new HashMap<>();
        for (MyMap m : Map) {
            hashMap.put(m.getName(), m.getValue());
        }
        return hashMap;
    }
}
